package com.example.myapplication.adapter.viewPagerAdapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.example.myapplication.Fragment.VideoRecommendFragment;

import java.util.List;

public class VideoAdapter extends FragmentPagerAdapter {
    private String[] key = {"推荐","音乐现场","MV","TME live","大牌直播","说唱","翻唱","影视剧","舞蹈","二次元","演奏"};
    private List<Fragment> fragmentList;

    public VideoAdapter(@NonNull FragmentManager fm, List<Fragment> fragmentList) {
        super(fm);
        this.fragmentList = fragmentList;
    }

    public VideoAdapter(@NonNull FragmentManager fm) {
        super(fm);
    }


    @NonNull
    @Override
    public Fragment getItem(int position) {
        return new VideoRecommendFragment() ;
    }

    @Override
    public int getCount() {
        return 11;
    }

    public CharSequence getPageTitle(int position) {
        return key[position];
    }
}
